package com.action.commute;

import com.db.commute.CommuteDAO;

public class LworkUpdateAction {	
	private int cno;
	private CommuteDAO commDAO;
	
	public void setCommDAO(CommuteDAO commDAO) {
		this.commDAO = commDAO;
	}

	public void setCno(int cno) {
		this.cno = cno;
	}

	public String execute(){
		String result = "";		
		try {
			if(commDAO.LwExist(cno) == false){				
				commDAO.UpdateLwork(cno);
			}
			result = "success";
		} catch (Exception e) {
			System.out.println("LworkUpdateAction.execute():"+e.toString());
			result = "error";			
		}
		return result;
	}
}
